package com.fsl.springbootdesignpattern.f_strategy;

public class Test {

    public static void main(String[] args) {

        Context context = new Context();

        Strategy strategy1 = new AddStrategy();

        context.setStrategy(strategy1);

        System.out.println(context.executeStrategy(10, 5));

        Strategy strategy2 = new multiplyStrategy();

        context.setStrategy(strategy2);

        System.out.println(context.executeStrategy(10, 5));

        Strategy strategy3 = new SubtractStrategy();

        context.setStrategy(strategy3);

        System.out.println(context.executeStrategy(10, 5));

    }
}
